import {get,post,put,deletefn,postform} from './http';

//普通用户接口
//登录
export const loginUser = (params) => post(`users/login`,params);
//注册
export const registerUser = (params) => post(`users/register`,params);
//完善个人信息
export const improveUserInfo = (params) => post(`center/complete`,params);
//退出登录
export const logoutUser = (params) => get(`users/logout`, params);

//首页
// 按分类查询列表
export const getCatList = (params) => get(`index/catList`, params);
//学习推荐列表
export const getRecommendList = (params) => get(`index/recommendList`, params);
//优质问题解答列表
export const getAnswerList = (params) => get(`index/answerList`, params);

//操作
//收藏资源
export const collectResource = (params) => post(`collect/add`, params);
//取消收藏资源
export const cancelCollectResource = (params) => post(`collect/cancel`, params);
//关注粉丝
export const followResource = (params) => post(`follow/addFollow`, params);
//取消关注粉丝
export const cancelFollowResource = (params) => post(`follow/cancelFollow`, params);

//交流区按分类查询列表
export const getCommunicationList = (params) => get(`index/postList`, params);
//交流区帖子详情
export const getPostDetail = (params) => get(`post/details`, params);
//发帖用户的用户信息
export const getUserDetail = (params) => get(`post/queryUserInfo`, params);
//新增帖子
export const addPost = (params) => postform(`post/addPost`, params);
//添加评论
export const addComment = (params) => post(`post/addComment`, params);
//删除评论
export const deleteComment = (params) => post(`post/deleteComment`, params);

//上传资源
export const addSource = (params) => postform(`resource/addResource`, params);

//个人信息
export const getUserInfo = (params) => get(`center/queryUserInfo`, params);
//修改个人信息
export const editUserInfo = (params) => post(`center/updateUserInfo`, params);
//修改用户密码
export const changePwd = (params) => post(`center/changePsd`,params);
//获取个人帖子列表
export const getUserPostList = (params) => get(`center/queryUserPostInfo`, params);
//获取收藏列表
export const getUserCollectList = (params) => get(`center/myColList`, params);
//删除帖子
export const deletePost = (params) => get(`center/deleteUserPost`, params);
//获取关注粉丝列表
export const getFollowList = (params) => get(`center/queryFollowList`, params);
//获取我的资源列表
export const getResourseList = (params) => get(`center/queryResList`, params);
//删除我的资源
export const deleteResourses = (params) => get(`center/delRes`, params);

//超级管理员角色
//获取用户列表信息
//获取帖子列表信息
//获取资源列表信息
//获取课件列表信息
//获取软件列表信息

//找回密码
// export const loginUser = (params) => post(`login`,params);
//查询所有用户
export const userList = (params) => get(`user/group`,params);
//新增用户
export const addUser = (params) => post(`user/add`,params);
//发送验证码
export const sendCode = (params) => post(`code`,params);
//找回密码
export const findPwd = (params) => post(`password`,params);
//修改用户信息
export const updatePwd = (params) => post(`user/update`,params);
//批发邮件
export const sendEmail = (params) => post(`email`,params);
//删除用户
export const deleteUser = (params) => deletefn(`user/delete`,{data: params});

//接口
//教职工会员中心---视频管理
//获取视频分页列表渲染（全部、通过）
export const videoList = (params) => get(`jeecg-boot/member/video/list`,params);
//获取视频分页视频渲染（不通过）
export const videoNotPassList = (params) => get(`jeecg-boot/member/video/notpass`,params);
//添加视频
export const addVideo = (params) => post(`jeecg-boot/member/video/add`,params);
//编辑视频
export const editVideo = (params) => put(`jeecg-boot/member/video/edit`,params);
//删除视频
export const deleteVideo = (params) => deletefn(`jeecg-boot/member/video/delete?id=`+params);
//屏蔽视频
export const shieldVideo = (params) => put(`jeecg-boot/member/video/shield?id=`+params);
//禁用视频
export const disableVideo = (params) => put(`jeecg-boot/member/video/disable?id=`+params);
//取消禁用
export const cancelDisableVideo = (params) => put(`jeecg-boot/member/video/disableCancel?id=`+params);
//取消屏蔽
export const cancelShieldVideo = (params) => put(`jeecg-boot/member/video/shieldCancel?id=`+params);
//专业下拉列表
export const professionDrop = () => get(`jeecg-boot/member/video/professionList`);
//export const deleteUser = (params) => deletefn(`user/delete?id=`+params);
//export const deleteUser = (params) => deletefn(`user/delete`,params);
//辑视频
//export const editVideo = (params) => put(`jeecg-boot/member/video/edit`,params);
//删除视频
//export const deleteVideo = (params) => deletefn(`jeecg-boot/member/video/delete?id=`+params);
